package me.zhengjie.modules.app.service;


import me.zhengjie.annotation.AnonymousAccess;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class WebCrawlerController {

    @Autowired
    private WebCrawlerService webCrawlerService;

    @AnonymousAccess
    @GetMapping("/fetch-data")
    public String fetchData() {
        webCrawlerService.fetchPageData();
        return "数据抓取完成";
    }
}